<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>天天生鲜-首页</title>
	<link rel="stylesheet" type="text/css" href="static/css/reset.css">
	<link rel="stylesheet" type="text/css" href="static/css/main.css">
	<script type="text/javascript" src="static/js/jquery-1.12.4.min.js"></script>
	<script type="text/javascript" src="static/js/jquery-ui.min.js"></script>
	<script type="text/javascript" src="static/js/slide.js"></script>
</head>
<body>

	{{template "/components/header.html" .}}
	<div class="search_bar clearfix">
		<a href="index.html" class="logo fl"><img src="static/images/logo.png"></a>
		{{template "/components/search.html" .}}
		<div class="guest_cart fr">
			<a href="/cart" class="cart_name fl">我的购物车</a>
			<div class="goods_count fl" id="show_count">1</div>
		</div>
	</div>

	<div class="navbar_con">
		<div class="navbar">
			<h1 class="fl">全部商品分类</h1>
			<ul class="navlist fl">
				<li><a href="">首页</a></li>
				<li class="interval">|</li>
				<li><a href="">手机生鲜</a></li>
				<li class="interval">|</li>
				<li><a href="">抽奖</a></li>
			</ul>
		</div>
	</div>

	<div class="center_con clearfix">
		<ul class="subnav fl">
			{{range .goodsTypes}}
				<li><a href="/goodsList?typeId={{.Id}}" class="{{.Logo}}">{{.Name}}</a></li>
			{{end}}
		</ul>
		<div class="slide fl">
			<ul class="slide_pics">
				{{range .indexGoodsBanners}}
				<li><img src="{{ConnStr `http://47.111.181.52:8888/` .Image `.jpg`}}" alt="幻灯片"></li>
				{{end}}
			</ul>
			<div class="prev"></div>
			<div class="next"></div>
			<ul class="points"></ul>
		</div>
		<div class="adv fl">
			{{range .indexPromotionBanners}}
				<a href="{{.Url}}"><img src="{{ConnStr `http://47.111.181.52:8888/` .Image `.jpg`}}"></a>
			{{end}}
		</div>
	</div>

	{{range .indexGoodsCates}}
	<div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model01">{{.type.Name}}</h3>
			<div class="subtitle fl">
				<span>|</span>
				{{range .textGoods}}
				 <a href="/goods/{{.GoodsSKU.Id}}">{{.GoodsSKU.Name}}</a>
				{{end}}
			</div>
			<a href="#" class="goods_more fr" id="fruit_more">查看更多 ></a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="{{ConnStr `http://47.111.181.52:8888/` .type.Image `.jpg`}}"></div>
			<ul class="goods_list fl">
				{{range .imgGoods}}
				<li>
					<h4><a href="/goods/{{.GoodsSKU.Id}}">{{.GoodsSKU.Name}}</a></h4>
					<a href="/goods/{{.GoodsSKU.Id}}"><img src="{{ConnStr `http://47.111.181.52:8888/` .GoodsSKU.Image `.jpg`}}"></a>
					<div class="prize">¥ {{.GoodsSKU.Price}}</div>
				</li>
				{{end}}
			</ul>
		</div>
	</div>
	{{end}}

	{{template "/components/footer.html" .}}
	<script type="text/javascript" src="js/slideshow.js"></script>
	<script type="text/javascript">
		BCSlideshow('focuspic');
		var oFruit = document.getElementById('fruit_more');
		var oShownum = document.getElementById('show_count');

		var hasorder = localStorage.getItem('order_finish');

		if(hasorder)
		{
			oShownum.innerHTML = '2';
		}

		oFruit.onclick = function(){
			window.location.href = 'list.html';
		}
	</script>
</body>
</html>